package cn.dapeng.regexp;

import java.util.regex.Pattern;

public class RegexpConstant {

    // 密码校验格式， 必须包含字母、数字、下划线和特殊字符，长度要求在8-16位
    public static final String PWD_REGEXP = "^(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[~!@&%#_])[a-zA-Z0-9~!@&%#_.]{8,16}$";
    // 数字校验
    public static final Pattern NUMBERS = Pattern.compile("\\d+");

    private static final Pattern IMAGE_PATTERN =
            Pattern.compile(".*\\.(jpg|jpeg|png|gif|bmp)$", Pattern.CASE_INSENSITIVE);


    private static final Pattern DOC_PATTERN =
            Pattern.compile(".*\\.(doc|docx|xls|xlsx|ppt|pptx|txt|xml|json|sql)$", Pattern.CASE_INSENSITIVE);


    private static final Pattern VIDEO_PATTERN =
            Pattern.compile(".*\\.(avi|mpg|mlv|mpe|mpeg|dat|mp4)$", Pattern.CASE_INSENSITIVE);

}
